<template>
  <!-- 净借记限额可用额度预警设置报文查询明细页面弹出框-->
  <el-dialog
    title="净借记限额可用额度预警设置报文查询明细"
    center
    :visible.sync="open"
    width="1024px"
    :close-on-click-modal="true"
    @close="closeFn"
  >
    <el-form ref="detailsForm" :model="formData" label-width="135px" :disabled="true">
      <el-card class="form-card txnInfo-card">
        <div slot="header" class="label-header-msg">
          <span>基本信息</span>
        </div>
        <el-row>
          <el-col :span="12">
            <el-form-item label="交易流水号：" prop="id">
              <el-input v-model="formData.id" placeholder="交易流水号" />
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="报文标识号：" prop="pkgId">
              <el-input v-model="formData.pkgId" placeholder="报文标识号" />
            </el-form-item>
          </el-col>
        </el-row>

        <el-row type="flex">
          <el-col :span="12">
            <el-form-item label="工作日期：" prop="workDate">
              <el-date-picker
                v-model="formData.workDate"
                type="date"
                value-format="yyyyMMdd"
                placeholder="选择日期"
                style="width: 100%"
              ></el-date-picker>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="系统编号：" prop="sysCode">
              <el-select v-model="formData.sysCode" placeholder="请选择" style="width: 100%">
                <el-option
                  v-for="dict in dictMap.SYSTEMCODE"
                  :key="dict.value"
                  :label="`${dict.value}-${dict.text}`"
                  :value="dict.value"
                ></el-option>
              </el-select>
            </el-form-item>
          </el-col>
        </el-row>

        <el-row>
          <el-col :span="12">
            <el-form-item label="发起参与机构：" prop="directSender">
              <el-input v-model="formData.directSender" placeholder="发起参与机构" />
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="发起参与机构名：" prop="directSenderName">
              <el-input v-model="formData.directSenderName" placeholder="发起参与机构名" />
            </el-form-item>
          </el-col>
        </el-row>

        <el-row>
          <el-col :span="12">
            <el-form-item label="被设置行行号：" prop="setStBrno">
              <el-input v-model="formData.setStBrno" placeholder="被设置行行号" />
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="被设置行行名：" prop="setStBrnoName">
              <el-input v-model="formData.setStBrnoName" placeholder="被设置行行名" />
            </el-form-item>
          </el-col>
        </el-row>
        <el-row type="flex">
          <el-col :span="12">
            <el-form-item label="预警开启关闭类型：" prop="switchType">
              <el-select v-model="formData.switchType" placeholder="请选择" style="width: 100%">
                <el-option
                  v-for="dict in dictMap.SWITCHTYPECODE"
                  :key="dict.value"
                  :label="`${dict.value}-${dict.text}`"
                  :value="dict.value"
                ></el-option>
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :span="12"></el-col>
        </el-row>

        <el-row type="flex">
          <el-col :span="12">
            <el-form-item label="货币币种：" prop="curcd">
              <el-input v-model="formData.curcd" placeholder="货币币种" />
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="可用额度预警值：" prop="warnValue">
              <HtAmountInput v-model="formData.warnValue" placeholder="可用额度预警值" />
            </el-form-item>
          </el-col>
        </el-row>

        <el-row>
          <el-col :span="24">
            <el-form-item label="备注：" prop="remarks">
              <el-input type="textarea" v-model="formData.remarks" placeholder="备注" maxlength="210" show-word-limit />
            </el-form-item>
          </el-col>
        </el-row>
      </el-card>
      <el-card class="form-card txnInfo-card">
        <div slot="header" class="label-header-msg">
          <span>行内处理状态</span>
        </div>
        <el-row type="flex">
          <el-col :span="12">
            <el-form-item label="通讯状态：" prop="status">
              <el-select v-model="formData.status" placeholder="请选择" style="width: 100%">
                <el-option
                  v-for="dict in dictMap.PKG_STATUS"
                  :key="dict.value"
                  :label="`${dict.value}-${dict.text}`"
                  :value="dict.value"
                ></el-option>
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="中心状态：" prop="pbocStatus">
              <el-select v-model="formData.pbocStatus" placeholder="请选择" style="width: 100%">
                <el-option
                  v-for="dict in dictMap.PROCESSSTATUS"
                  :key="dict.value"
                  :label="`${dict.value}-${dict.text}`"
                  :value="dict.value"
                ></el-option>
              </el-select>
            </el-form-item>
          </el-col>
        </el-row>

        <el-row type="flex">
          <el-col :span="12">
            <el-form-item label="录入操作员：" prop="mdTlrno">
              <el-input v-model="formData.mdTlrno" placeholder="录入操作员" />
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="录入时间：" prop="mdTime">
              <el-date-picker
                v-model="formData.mdTime"
                type="datetime"
                value-format="yyyyMMddHHmmss"
                placeholder="选择时间"
                style="width: 100%"
              ></el-date-picker>
            </el-form-item>
          </el-col>
        </el-row>

        <el-row type="flex">
          <el-col :span="12">
            <el-form-item label="报文发送时间：" prop="senderDatetime">
              <el-date-picker
                v-model="formData.senderDatetime"
                type="datetime"
                value-format="yyyyMMddHHmmss"
                placeholder="选择时间"
                style="width: 100%"
              ></el-date-picker>
            </el-form-item>
          </el-col>
          <el-col :span="12"></el-col>
        </el-row>

        <el-row>
          <el-col :span="24">
            <el-form-item label="通用报文处理码：" prop="procCode">
              <el-select v-model="
                    formData.procCode === null || formData.procCode === undefined
                      ? ''
                      : formData.procCode + '-' + formData.procCodeDesc
                  " placeholder="请选择" style="width: 100%">
              </el-select>
            </el-form-item>
          </el-col>
        </el-row>

        <el-row>
          <el-col :span="24">
            <el-form-item label="业务拒绝信息：" prop="rejectInfo">
              <el-input
                type="textarea"
                v-model="formData.rejectInfo"
                placeholder="业务拒绝信息"
                maxlength="210"
                show-word-limit
              />
            </el-form-item>
          </el-col>
        </el-row>
      </el-card>
    </el-form>
    <div slot="footer" class="dialog-footer"></div>
  </el-dialog>
</template>
<script>
import HtAmountInput from "@/views/components/HtAmountInput/index.vue";
export default {
  name: "NetDebitDetails",
  components: {HtAmountInput},
  props: {
    dictMap: {
      type: Object,
      default: () => {
        return {};
      },
    },
    formData: {
      type: Object,
      default: () => {
        return {};
      },
    },
  },
  data() {
    return {
      // 是否显示弹出层
      open: false,
    };
  },
  mounted() {},
  methods: {
    // 表单重置
    reset() {
      this.resetForm("detailsForm");
      // this.$set(this, "form", {});
    },
    closeFn() {
      this.open = false;
    },
    show() {
      this.open = true;
    },

    cancel() {
      this.open = false;
      this.reset();
    },
  },
};
</script>
<style>
.label-header-msg {
  font-weight: bold;
}

.form-card {
  margin-bottom: 10px;
}
</style>
